/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.just.dusin.ooii.component.standard;

import java.util.List;
import org.just.dusin.ooii.component.Pipe;
import java.util.Properties;
import org.just.dusin.ooii.component.Sink;
import org.dusin.webcoal.exception.OOIIException;
import org.just.dusin.ooii.util.CipherUtil;

/**
 *
 * @author Administrator
 */
public class MD5AttachedPipe extends Pipe {

    @Override
    public void process(String msg) throws OOIIException {
        String md5 = CipherUtil.encodeByMD5(msg);
        String msgWithMd5 = msg+md5;
        sink.process(msgWithMd5);
    }

    @Override
    public void process(List<String> msgs) throws OOIIException {        
        for(String msg:msgs){
            process(msg);
        }
    }
}
